package br.com.felix.fwt.ui.css;

/**
 * Enumerates the possible named values for the CSS property 'font-size'.
 * */
public enum FontSizes implements FontSize{
	XX_SMALL(6),
	X_SMALL(8),
	SMALL(10),
	MEDIUM(12),
	LARGE(14),
	X_LARGE(18),
	XX_LARGE(20),
	SMALLER(9),
	LARGER(16);
	
	private FontSizes(int pointSize){
		this.pointSize = pointSize;
	}
	
	/**
	 * Size of the font measured in Points.
	 * */
	private int pointSize;
	
	
	
	/**
	 * Returns the CSS value for the FontSize.
	 * @return the CSS value.
	 * */
	public String toString(){
		return getCssSize();
	}

	public String getCssSize() {
		return super.toString().toLowerCase().replaceAll("_", "-");
	}

	@Override
	public int getPointSize() {
		return pointSize;
	}
}
